Automatic generation of code for component interfaces in models

ABSTRACT

Methods, systems and computer program products are disclosed for automatically generating hardware description language code from a model. The hardware description language code may be generated from a graphical program/model, such as a block diagram model. The hardware description language code may also be generated from a text-based program/model, such as a model created using MATLAB® tools. In particular, the present invention provides for the automatic code generation of an interface between components in the model. The present invention may provide options for selecting at least one of multiple types or styles of the component interfaces in the model. The selection of the interface types or styles may be controlled by the user or inferred by other parameters, such as implementation parameters.

RELATED APPLICATIONS

The present application claims priority to a United States provisionalapplication, Patent Application No. 60/611,909 filed Sep. 20, 2004, thecontents of which are incorporated herein by reference.

FIELD OF THE INVENTION

The present invention relates generally to code generation and moreparticularly to methods, systems and computer program products forautomatically generating code for component interfaces in a model.

BACKGROUND OF THE INVENTION

Historically, engineers and scientists have utilized text-based orgraphical programs/models in numerous scientific areas such as FeedbackControl Theory and Signal Processing to study, design, debug, and refinedynamic systems. Dynamic systems, which are characterized by the factthat their behaviors change over time, are representative of manyreal-world systems. Text-based or graphical programming/modeling hasbecome particularly attractive over the last few years with the adventof software packages, such as MATLAB®, and Simulink®, both from TheMathWorks, Inc. of Natick, Mass. Such packages provide sophisticatedsoftware platforms with a rich suite of support tools that makes theanalysis and design of dynamic systems efficient, methodical, andcost-effective.

Using the models or algorithms, an engineer or scientist can analyze thebehavior of a circuit before the circuit is built. When the engineer orscientist determines the behavior of the circuit, then the models oralgorithms are represented in Hardware Description Language (HDL) codeto implement the circuit. HDL refers to any language from a class ofcomputer languages for formal description of hardware. It can describehardware operation, its design, and tests to verify its operation bymeans of simulation. HDL code is a standard text-based expression of thetemporal behaviour and/or (spatial) structure of the hardware. HDL'ssyntax and semantics include explicit notations for expressing time andconcurrency which are the primary attributes of hardware.

Using the hardware description in HDL code, a software program called anhardware synthesis tool can infer hardware logic operations from thehardware description statements and produce an equivalent netlist ofgeneric hardware primitives to implement the specified behaviour.However, designing hardware systems in HDL code is generally difficultand as a result time consuming. Therefore, there is a need for a processfor automatically generating HDL code for hardware systems.

SUMMARY OF THE INVENTION

The present invention provides systems, methods and computer programproducts for automatically generating HDL code from a model. The HDLcode may be generated from a graphical program/model, such as a blockdiagram model. The HDL code may also be generated from a text-basedprogram/model, such as a model created using MATLAB® tools. Inparticular, the present invention provides for the automatic codegeneration of interfaces between components in the model. The presentinvention may provide options for selecting types or styles of thecomponent interfaces in the model. The selection of the interface typesor styles can be controlled by the user or can be inferred by certainmodel parameters, such as power parameters, required throughput and/orclock parameters, and circuit area or size parameters. Once theinterface types or styles are determined, HDL code for the componentinterfaces is automatically generated that comply with the determinedinterface types or styles.

In one aspect of the present invention, a method is provided forgenerating code from a model in a computing device. The method includesthe step of determining an interface between a portion of a firstcomponent of the model and a portion of a second component of the model.The method also includes the step of automatically generating coderepresentative of the interface between the portion of the firstcomponent and the portion of the second component of the model. When thecode for the interface between the components of the model is compiled,an output of the compiler is used to implement the interface in ahardware component.

In another aspect of the present invention, a system is provided forgenerating code from a model. The system includes a user interface forenabling users to create the model. The system also includes a codegenerator for determining an interface between a portion of a firstcomponent of the model and a portion of a second component of the model.The code generator automatically generates code representative of theinterface between the portion of the first component and the portion ofthe second component of the model. When the code for the interfacebetween the components of the model is compiled, an output of thecompiler is used to implement the interface in a hardware component.

In another aspect of the present invention, a computer program productis provided for holding instructions executable to perform a method in acomputer. The method includes the step of determining an interfacebetween a portion of a first component of the model and a portion of asecond component of the model. The method also includes the step ofautomatically generating code representation of the interface betweenthe portion of the first component and the portion of the secondcomponent of the model. When the code for the interface between thecomponents of the model is compiled, an output of the compiler is usedto implement the interface in a hardware component.

BRIEF DESCRIPTION OF THE DRAWINGS

The aforementioned features and advantages, and other features andaspects of the present invention, will become better understood withregard to the following description and accompanying drawings, wherein:

FIG. 1 is an exemplary computing device suitable for practicing theillustrative embodiment of the present invention;

FIG. 2 is an exemplary environment for generating code from a model inthe illustrative embodiment of the present invention;

FIG. 3 is a flow chart showing an exemplary operation for generatingcode from a model in the illustrative embodiment of the presentinvention;

FIG. 4 shows an exemplary model from which hardware description language(HDL) code is generated in the illustrative embodiment of the presentinvention;

FIG. 5 is a flow chart showing an exemplary operation for generatinginterfaces between components or elements in the model depicted in FIG.4;

FIG. 6 is a flow chart showing another exemplary operation forgenerating interfaces between components or elements in the modeldepicted in FIG. 4; and

FIG. 7 is a table showing exemplary interfaces for the weightedcombinations of implementation parameters.

DETAILED DESCRIPTION

Certain embodiments of the present invention are described below. It is,however, expressly noted that the present invention is not limited tothese embodiments, but rather the intention is that additions andmodifications to what is expressly described herein also are includedwithin the scope of the invention. Moreover, it is to be understood thatthe features of the various embodiments described herein are notmutually exclusive and can exist in various combinations andpermutations, even if such combinations or permutations are not madeexpress herein, without departing from the spirit and scope of theinvention.

The illustrative embodiment of the present invention provides forautomatic code generation from a text-based or graphical program/model.The terms “program/programming” and “model/modeling” will beinterchangeably used in the description of the illustrative embodiment.The illustrative embodiment automatically generates code for thehardware description of the program/model. The hardware description canbe generated in Hardware Description Language (HDL) code, such as veryhigh speed integrated circuit hardware description language (VHDL) code,SystemC code and Verilog code. Although the illustrative embodiment willbe described below relative to HDL code, one of ordinary skill in theart will appreciate that the hardware description can be generated usingother programming languages, such as C++, C and C#.

The HDL code can be generated from either a text-based or graphicalprogram/model. As an exemplary graphical program/model, the illustrativeembodiment will be described below solely for illustrative purposesrelative to a block diagram model. One of ordinary skill in the art willappreciate that the block diagram model is illustrative and the presentinvention can apply to other graphical programs/models, such as dataflow models, discrete-event models, and system-level modeling languagessuch as Unified Modeling Language (UML), as long as the graphical modelhas some notion of semantics that allows it to be transformed into anexecutable for a computer processor/microcontroller or directlysynthesized in application-specific hardware.

An exemplary graphical program/model can be created in Simulink®, whichprovides tools for modeling and simulating a variety of dynamic systemsin one integrated, graphical environment. Simulink® enables users todesign a block diagram for a target system, simulate the system'sbehavior, analyze the performance of the system, and refine the designof the system. Simulink® allows users to design target systems through auser-interface that allows drafting of block diagram models of thetarget systems. All of the blocks in a block library provided bySimulink® and other programs are available to users when the users arebuilding the block diagram of the target systems. Individual users maybe able to customize this model to: (a) reorganize blocks in some customformat, (b) delete blocks they do not use, and (c) add custom blocksthey have designed. The blocks can be copied from the block library onto the window (i.e., model canvas) through some human-machine interface(such as a mouse or keyboard).

The illustrative embodiment can also generate HDL code from a text-basedprogram/model implemented using functional, object-oriented, or otherdesign methodology. Such a model may be designed using, for example,textual object-oriented components provided by the Filter Design Toolboxfrom The MathWorks, Inc. of Natick, Mass. One of ordinary skill in theart will appreciate that the model designed using Filter Design Toolboxis illustrative and the present invention can apply to other text-basedprograms/models designed using other tools.

The Filter Design Toolbox provides tools and techniques for designing,simulating, and analyzing filters. The Filter Design Toolbox providesfilter architectures and design methods for complex real-time DSPapplications, including adaptive and multiple rate filtering. The FilterDesign Toolbox also provides functions that simplify the design offixed-point filters and the analysis of quantization effects. The FilterDesign Toolbox enables users to generate HDL code, such as VHDL code andVerilog code, for fixed-point filters when it is used with the FilterDesign HDL Coder, which will be described below in more detail withreference to FIG. 2.

The illustrative embodiment will be described below solely forillustrative purposes relative to a graphical program/model implementedusing Simulink® and a text-based program/model implemented using FilterDesign Toolbox. Nevertheless, those of skill in the art will appreciatethat the present invention may be practiced relative to modelsimplemented in other text-based or graphical programming/modeling tools,including but not limited to LabVIEW and Hyperception from NationalInstruments Corporation of Austin, Tex., Signal Processing Workbench(SPW) from CoWare, Inc. of San Jose, Calif., VisualSim from MirabilisDesign of Sunnyvale, Calif., and Rational Rose from IBM of White Plains,N.Y.

The illustrative embodiment of the present invention provides for theautomatic HDL code generation for interfaces between components in amodel. An interface between components refers to a collection of signalsused to transfer information from one block to another block. There maybe one or more subsets of the interface in which one or more signals aregrouped. The interface between two components matches on both sides ofthe components. That is, the properties of the signals in the interface,such as the types, dimensions and sizes of the signals, on the side ofone component are compatible with those of the signals on the side ofthe other component. The interface may include one or more signals thatcan be controlled by users and specifically depicted to the users in themodel. The interface may also include one or more signals that are notcontrolled by the users and not specifically depicted to the users inthe model, but are automatically added by design tools to control thetransfer of the information between the components of the model.

Although one interface between two components of the model can beimplemented in the real hardware of the model, multiple types or stylesof the interface can be considered in the design process of the model.In the illustrative embodiment, options can be provided for selectingone or more types or styles of the component interfaces in the model.For example, in an exemplary block-diagram, one interface type or stylecan be configured to receive or transfer data every clock cycle. Inanother interface type or style, the transfer of data is flow-controlledby a clock-enable signal. The options may include many other interfacetypes or styles. If multiple types or styles of the interface areavailable, the design tools may determine the final type or style of theinterface using one or more selection criteria, such as a cost function,to achieve a user-specified goal such as low-power or high performance.In the description of the illustrative embodiment set forth below, theterms “interface types and “interface styles” are interchangeably usedto refer to the interfaces having different characteristics of signalsbetween components in a model.

With some guidance from the users, any of the interface types or stylescould be created in the HDL code. Alternatively, the selection ofinterface types or styles can be inferred by certain model parameters,such as implementation parameters including power parameters, clockparameters and implementation area or size parameters. Once theinterface types or styles are determined, HDL code for the componentinterfaces is automatically generated that comply with the determinedinterface types or styles. When the code for the interface between thecomponents of the model is compiled by a compiler, an output of thecompiler is used to implement the interface in a hardware component.

FIG. 1 is an exemplary computing device 100 suitable for practicing theillustrative embodiment of the present invention. One of ordinary skillin the art will appreciate that the computing device 100 is intended tobe illustrative and not limiting of the present invention. The computingdevice 100 can be an electronic device including but not limited to aworkstation, server, network computer, Internet appliance, mobiledevice, a pager, a tablet computer, and the like.

The computing device 100 includes a network interface 160, a modem 150,storage 130, memory 120, a central processing unit (CPU) 110, a display170, an input control 140, a keyboard 180 and a mouse 190. One ofordinary skill in the art will appreciate that the computing device 100may be connected to communication networks using the modem 150 andnetwork interface 160. The network interface 160 and the modem 150enable the computing device 100 to communicate with other computingdevices through communication networks, such as the Internet, anintranet, a LAN (Local Area Network), a WAN (Wide Area Network) and aMAN (Metropolitan Area Network).

The CPU 110 controls each component of the computing device 100 to runsoftware tools for generating HDL code from a model. The computingdevice 100 receives input commands necessary for generating HDL code,such as the selection of HDL code languages, through the keyboard 180 ormouse 190. The computing device 100 may display the options for thetypes or styles of the component interfaces in the model. The memory 120temporarily stores and provides to the CPU 110 the code that need to beaccessed by the CPU 110 to operate the computing device 100 and to runthe software tools. The storage 130 usually contains software tools forapplications. The storage 130 includes, in particular, code 131 for anoperating system, code 132 for applications, such as a code generator230 and code 133 for data including the model and HDL code generatedfrom the model. The code generator 230 will be described below in moredetail with reference to FIG. 2.

FIG. 2 shows an exemplary environment 200 for generating HDL code 240 inthe illustrative embodiment of the present invention. The environment200 can be a modeling environment in which a model 220 can be created,simulated, executed and/or tested. The environment 200 can include auser interface 210 and a code generator 230. The user interface 210 caninclude a graphical user interface (GUI) and/or a command line interface(CLI) for allowing users to create the model 220 and enabling the codegenerator 230 to generate HDL code 240 from the model 220. The userinterface 210 enables users to input data for the model 220. Inparticular, the user interface 210 can enable the users to input datanecessary for generating the HDL code 240 from the model 220, such asdata for selecting the language of the HDL code 240, such as VHDL code,SystemC code and Verilog code or other versions of HDL code. The userinterface 210 may allow users to input parameters for selecting ordefining the type or style of interfaces between the components in themodel 220. The user interface 210 may also allow the users to inputother parameters, such as implementation parameters including powerparameters, clock parameters and implementation area or size parameters.The code generator 230 generates the HDL code 240 based on the dataentered or selected by the users using the user interface 210.

An exemplary code generator 230 can be found in Filter Design HDL Coderfrom The MathWorks, Inc. of Natick, Mass. The Filter Design HDL Codergenerates HDL code and test benches for filters that users design andcreate. The Filter Design HDL Coder enables users to generate VHDL codeor Verilog code for filters designed with the Filter Design Toolbox forimplementation in application-specific integrated circuit (ASIC) orfield programmable gate array (FPGA), or other hardware component. TheFilter Design HDL Coder also automatically creates VHDL, Verilog, andModelSim test benches for simulating, testing, and verifying thegenerated code. The test bench feature increases confidence in thecorrectness of the generated code and saves time spent on test benchimplementation. The test bench will be described below in more detailwith reference to FIG. 3. Using the Filter Design HDL Coder, systemarchitects and designers can spend more time on fine-tuning algorithmand models through simulation and less time on HDL coding.

FIG. 3 depicts an exemplary operation for generating HDL code 240 from amodel 220 in the illustrative embodiment of the present invention. Themodel 220 can be created using the user interface 210 in the environment200 (step 310). The model 220 created in the environment 200 can beeither a text-based or graphical model. The graphical model can begenerated using a graphical model design tool, such as Simulink®. One ofordinary skill in the art will appreciate that the Simulink® is anillustrative modeling tool and the present invention may use othergraphical model design tools, for example LabVIEW and Hyperception fromNational Instruments, Signal Processing WorkBench (SPW) from CoWare,VisualSim from Mirabilis Design, Rational Rose from IBM, etc. Thetext-based model can be generated using a text-based model design tool,such as Filter Design Toolbox. One of ordinary skill in the art willappreciate that the text-based model can be generated using othertext-based model design tools.

FIG. 4 is an exemplary model designed in the illustrative embodiment.The model 400 includes two components (or elements) including filter 410and filter 420. The components of the model 400 depicted in FIG. 4 isillustrative and the model 400 can include more than two components orelements, and multiple interfaces for different portions of the model400.

Referring back to FIG. 3, the code generator 230 generates HDL code 240from the model 220 (step 320). When the HDL code 240 is generated forthe model 240, such as the model 400 having filter 410 and filter 420 asits components, component interfaces between the components of the model220 are also generated. Sometimes component interfaces have signals thatare not specifically depicted to a user in the displayed representationof the model 400. Such signals may include, but are not limited tovarious types of control signals, for example:

(1) reset signal 430 (dotted line in FIG. 4);

(2) clock-enable signal 440 (dotted line in FIG. 4);

(3) bidirectional flow-control handshake signals; and

(4) other like control signals.

These signals are added to the component interfaces by the codegenerator 230 in the process of generating the HDL code from the model220 to facilitate the synthesis of an actual hardware system, such as aFPGA and an ASIC. Those of ordinary skill in the art will appreciatethat the control signals set forth above are illustrative and thecomponent interfaces may include other signals that can be used tocontrol data flow between components. The component interfaces includeinformation representing signals transferred between the components,which are specifically depicted in the displayed representation of themodel 400, and control signals performing the flow-control of databetween the components.

FIG. 5 is a flow chart showing an exemplary operation for generating acomponent interface between filter 410 and filter 420 in the model 400.First, the environment 200 may provide users with options for selectingthe types or styles of the component interfaces via the user interface210 (step 510). The interface types or styles may define differentcharacteristics for the component interfaces in the model 440. Theinterface types or styles may define how data is transferred between thecomponents in the model. The options for the interface types or stylesmay include:

(1) an interface where the input and output data are transferred everyclock cycle;

(2) an interface where the input data is transferred every clock cyclebut the output is flow-controlled by an output enable signal;

(3) an interface where the input and output data transfer isflow-controlled by a clock enable input signal;

(4) an interface where the input and output data transfer isflow-controlled by a clock gating signal;

(5) a serial interface where the input and output data are transferredone bit per clock cycle; and

(6) an interface with a unidirectional flow-control;

(7) an interface with a bidirectional flow-control;

(8) an interface with a single clock;

(9) an interface with multiple clocks; and

(10) many other interface types or styles.

Those of ordinary skill in the art will appreciate that the interfacetypes set forth above are illustrative and other types of interfaces canbe may be included to define different characteristics for theinterfaces.

The users may be able to select one or more options for the types orstyles of the component interface between filter 410 and filter 420 inthe model 400 (step 520). If multiple types or styles are selected, afinal type or style of the interface can be determined using a balancingalgorithm, such as a cost function, for the real hardware implementationof the model 400. In the illustrative embodiment, the selection of theinterface types or styles may be directly controlled by the user usingthe user interface 210. In another embodiment, the selection of theinterface types or styles may also be inferred from other parameters forthe model 400.

One of ordinary skill in the art will appreciate that the model 400 isillustrative and the present invention may apply to a model thatincludes multiple interfaces for different portions of the model. One ofordinary skill in the art will also appreciate that the user interface210 may enable the users to select options for the types or styles ofthe multiple interfaces.

FIG. 6 is a flow chart showing another exemplary operation forgenerating code for a component interface between filter 410 and filter420 in the model 400. The selection of the interface types or styles maybe inferred from other parameters for the model 400, such asimplementation parameters that the users have entered (step 610). TheHDL code 240 can be generated to comply with one or more implementationparameters including but not limited to:

(1) various power requirements;

(2) various clock rates;

(3) size constraints; and

(4) a weighted combination of implementation parameters.

The various power requirements may include the amount of power that canbe consumed in the implemented hardware system, the amount of inputpower than can be handled by the implemented hardware system, the amountof output power than can be produced by the implemented hardware systemor any other power requirements relating to the implemented hardwaresystem. The various clock rates may include a high speed clock rate, alow speed clock rate or any specific clock rate that can determine thespeed of the implemented hardware system. The size constraints maydetermine the area of the implemented hardware system. Those of skill inthe art will appreciate that the HDL code 240 can be generated to complywith a weighted combination of one or more implementation parameters.

FIG. 7 depicts exemplary interfaces for the weighted combination of theimplementation parameters. HDL code 240 for Interface A can be generatedto increase the clock speed and decrease the power consumption while HDLcode 240 for Interface B can be generated to increase the clock speedand decrease the implementation area. HDL code for Interface C can begenerated to decrease the power consumption and the implementation area.Interfaces A, B and C have multiple types or styles, such as the clockspeed, power consumption, and implementation area. A cost function thatgives a cost measure can be used to determine the final type or style ofthe interface for the hardware implementation. Those skilled in the artwill appreciate the implementation parameters listed above areillustrative and other parameters may be considered to determine thetype or style of the component interface. Those skilled in the art willappreciate the combinations of the implementation parameters depicted inFIG. 7 are also illustrative and other combinations may be considered todetermine the type or style of the component interface. If the usersinput the implementation parameters, the code generator 230 maydetermine the type or style of the component interface from theimplementation parameters.

In a circuit implementation, goals may differ in different parts of thesystem. Thus, more than one goal may be specified for a given circuit,and different interface styles may be simultaneously employed within thecircuit.

Referring back to FIGS. 5 and 6, if the type or style of the componentinterface is determined, the code generator 230 generates the HDL code240 for the component interface between filter 410 and filter 420 basedon the interface type or style (step 530 in FIG. 5 and step 620 in FIG.6). In the process of generating the component interface that complieswith the determined interface type or style, the attributes of filter410 and filter 420 are propagated programmatically throughout the model400. For each of the components, a method forces the component toevaluate all of its parameters. This method is called for all componentsin the model. During the propagation, the attributes of signals, such asreset signals and clock-enable signals, in the component interfaces aredetermined on the basis of the attributes of components that areconnected to each other and the determined interface type or style. Forexample, the attributes of the interface between filter 410 and filter420 are determined on the basis of the attributes of filter 410 andfilter 420 and the interface type or style of the component interfacebetween filter 410 and filter 420. One of ordinary skill in the art willappreciate that the component interface may be implemented using a datastructure wherein the data structure is filled with the attributes ofthe component interface. An exemplary data structure is disclosed in acopending U.S. patent application Ser. No. 10/414,644 entitled “A SYSTEMAND METHOD FOR USING EXECUTION CONTEXTS IN BLOCK DIAGRAM MODELING,”which is incorporated herewith by reference.

Referring back to FIG. 3, the generated HDL code 240 may be simulated toverify the results of the HDL code 240 (step 330). Users may simulatethe HDL code 240 using a HDL code simulation tool, such as ModelSim fromMentor Graphics Corporation of Wilsonville, Oreg. The HDL code 240 maybe verified using a test bench generated by the code generator 230. Inorder to verify the functionality of the generated HDL code, the codegenerator 230 may generate the test bench in many forms including: VHDLor Verilog HDL code written at a behavioral level; a Simulink® diagram;a MATLAB® function called via a co-simulation interface; a scriptinglanguage files such as a TCL file for the simulation tool; and anindustry standard value-change-dump (VCD) file that gives inputs,outputs, and the times each are valid. To simulate the generated HDLcode 240, users may start the simulation tool and compile the generatedHDL code 240 and test bench files in the simulation tool. The test benchconnects to top-level of the generated HDL code. The test bench drivesthe primary inputs for testing, such as sampled data for a filter orEthernet packets, and the ancillary inputs for control, such as theclock, the reset, the clock enable and the control inputs. The testbench checks or verifies whether the outputs are the correct values atany or all instant of time.

It will thus be seen that the invention attains the objectives stated inthe previous description. Since certain changes may be made withoutdeparting from the scope of the present invention, it is intended thatall matter contained in the above description or shown in theaccompanying drawings be interpreted as illustrative and not in aliteral sense. For example, the illustrative embodiment of the presentinvention may be practiced in any other programming/modeling environmentthat provides for the synchronization of actions in a model.Practitioners of the art will realize that the sequence of steps andarchitectures depicted in the figures may be altered without departingfrom the scope of the present invention and that the illustrationscontained herein are singular examples of a multitude of possibledepictions of the present invention.

1. In a computing device, a method for generating code from a model fora hardware implementation of the model, the method comprising:determining an interface between a portion of a first component of themodel and a portion of a second component of the model; andautomatically generating code representative of the interface betweenthe portion of the first component and the portion of the secondcomponent of the model, wherein when the code for the interface betweenthe components of the model is compiled, an output of the compiler isused to implement the interface in a hardware component.
 2. The methodof claim 1, wherein the generated code comprises Hardware DescriptionLanguage (HDL) code.
 3. The method of claim 1, wherein the modelcomprises a graphical model having at least one block representation. 4.The method of claim 1, wherein the model comprises a text based model.5. The method of claim 1, wherein the interface comprises information ondata transfer between the portion of the first component of the modeland the portion of the second component of the model.
 6. The method ofclaim 5, wherein the interface comprises information on data transferredand information on a control of the data transfer.
 7. The method ofclaim 1, wherein the interface comprises attributes of at least one of areset signal, a clock signal and a clock-enable signal to control datatransfer between the portion of the first component of the model and theportion of the second component of the model.
 8. The method of claim 1,wherein the step of determining comprises: determining multiple types ofthe interface between a portion of the first component of the model anda portion of the second component of the model; and selecting one typeof the interface from the multiple types of the interface.
 9. The methodof claim 1, wherein the step of determining comprises: providing optionsfor selecting types of the interface; and enabling users to select atleast one of the types of the interface.
 10. The method of claim 9,wherein the step of providing comprises: providing at least one type ofthe interface where data is transferred every clock cycle.
 11. Themethod of claim 9, wherein the step of providing comprises: providing atleast one type of the interface where data is transferred with aunidirectional flow-control.
 12. The method of claim 9, wherein the stepof providing comprises: providing at least one type of the interfacewhere data is transferred with a bidirectional flow-control.
 13. Themethod of claim 9, wherein the step of providing comprises: providing atleast one type of the interface where data is transferred by a singleclock signal.
 14. The method of claim 1, wherein the step of determiningcomprises: determining a type of the interface from parameters of themodel.
 15. The method of claim 14, wherein the parameters of the modeldefine a hardware implementation of the model.
 16. The method of claim15, wherein the parameters of the model comprise at least one of powerrequirements parameters, clock rates parameters and size constraintsparameters.
 17. The method of claim 15, wherein the parameters of themodel comprise a weighted combination of parameters for powerrequirements, clock rates and size constraints.
 18. In a computingdevice, a method for generating code from a model for a hardwareimplementation of the model, the method comprising: determining aplurality of interfaces for a plurality of portions of the model, eachof the plurality of interfaces interfacing with components in adifferent portion of the model; and automatically generating coderepresentative of the plurality of interfaces for the plurality ofportions of the model, wherein when the code for the plurality ofinterfaces is compiled, an output of the compiler is used to implementthe plurality of interfaces in a hardware circuit of the model.
 19. Asystem for generating code from a model for-a hardware implementation ofthe model, the system comprising: a user interface for determining aninterface between a portion of a first component of the model and aportion of a second component of the model; and a code generator forautomatically generating code representative of the interface betweenthe portion of the first component and the portion of the secondcomponent of the model, wherein when the code for the interface betweenthe components of the model is compiled, an output of the compiler isused to implement the interface in a hardware component.
 20. The systemof claim 19, wherein the generated code comprises Hardware DescriptionLanguage (HDL) code.
 21. The system of claim 19, wherein the modelcomprises a graphical model having at least one block representation.22. The system of claim 19, wherein the model comprises a text basedmodel.
 23. The system of claim 19, wherein the interface comprisesinformation on data transfer between the portion of the first componentof the model and the portion of the second component of the model. 24.The system of claim 19, wherein the interface is implemented as a datastructure that contains information on data transfer between the portionof the first component of the model and the portion of the secondcomponent of the model.
 25. The system of claim 19, wherein theinterface comprises attributes of at least one of a reset signal, aclock signal and a clock-enable signal that controls data transferbetween the portion of the first component of the model and the portionof the second component of the model.
 26. The system of claim 19,wherein the code generator determines multiple types and styles of theinterface between a portion of the first component of the model and aportion of the second component of the model, and selects one type ofthe interface from the multiple types of the interface.
 27. The systemof claim 19, wherein the user interface provides options for selectingtypes of the interface, and enables users to select at least one of thetypes of the interface.
 28. The system of claim 27, wherein the userinterface provides at least one of types of the interface where data istransferred every clock cycle, where data transfer is flow-controlled bya control signal, and where data is transferred one bit per clock cycle.29. The system of claim 27, wherein the user interface provides at leastone of types of the interface with a unidirectional flow-control, andwith a bidirectional flow-control.
 30. The system of claim 27, whereinthe user interface provides at least one of types of the interface witha single clock signal, and with multiple clock signals.
 31. The systemof claim 19, wherein the code generator determines a type of theinterface from parameters for the model.
 32. The system of claim 31,wherein the parameters for the model comprise parameters for hardwareimplementation of the model.
 33. The system of claim 32, wherein theparameters for hardware implementation of the model comprise at leastone of parameters for power requirements, clock rates and sizeconstraints.
 34. The system of claim 32, wherein the parameters forhardware implementation of the model comprise a weighted combination ofparameters for power requirements, clock rates and size constraints. 35.A system for generating code from a model for a hardware implementationof the model, the system comprising: a user interface for determining aplurality of interfaces for a plurality of portions of the model, eachof the plurality of interfaces interfacing with components in adifferent portion of the model; and a code generator for automaticallygenerating code representative of the plurality of interfaces for theplurality of portions of the model, wherein when the code for theplurality of interfaces is compiled, an output of the compiler is usedto implement the plurality of interfaces in a hardware circuit of themodel.
 36. A computer program product for holding instructionsexecutable in a computer for generating code from a model, comprising:determining an interface between a portion of a first component of themodel and a portion of a second component of the model; andautomatically generating code representative of the interface betweenthe portion of the first component and the portion of the secondcomponent of the model, wherein when the code for the interface betweenthe components of the model is compiled, an output of the compiler isused to implement the interface in a hardware component.
 37. Thecomputer program product of claim 36, wherein the generated codecomprises Hardware Description Language (HDL) code.
 38. The computerprogram product of claim 36, wherein the model comprises a graphicalmodel having at least one block representation.
 39. The computer programproduct of claim 36, wherein the model comprises a text based model. 40.The computer program product of claim 36, wherein the interfacecomprises information on data transfer between the portion of the firstcomponent of the model and the portion of the second component of themodel.
 41. The computer program product of claim 36, wherein theinterface is implemented as a data structure that contains informationon data transfer between the portion of the first component of the modeland the portion of the second component of the model.
 42. The computerprogram product of claim 36, wherein the interface comprises attributesof at least one of a reset signal, a clock signal and a clock-enablesignal that controls data transfer between the portion of the firstcomponent of the model and the portion of the second component of themodel.
 43. The computer program product of claim 36, wherein the step ofdetermining comprises: determining multiple types and styles of theinterface between a portion of the first component of the model and aportion of the second component of the model; and selecting one type ofthe interface from the multiple types of the interface.
 44. The computerprogram product of claim 36, wherein the step of determining comprises:providing options for selecting types of the interface; and enablingusers to select at least one of the types of the interface.
 45. Thecomputer program product of claim 44, wherein the step of providingcomprises: providing at least one of types of the interface where datais transferred every clock cycle, where data transfer is flow-controlledby a control signal, and where data is transferred one bit per clockcycle.
 46. The computer program product of claim 44, wherein the step ofproviding comprises: providing at least one of types of the interfacewith a unidirectional flow-control, and with a bidirectionalflow-control.
 47. The computer program product of claim 44, wherein thestep of providing comprises: providing at least one of types of theinterface with a single clock signal, and with multiple clock signals.48. The computer program product of claim 36, wherein the step ofdetermining comprises: determining a type of the interface fromparameters for the model.
 49. The computer program product of claim 48,wherein the parameters for the model comprise parameters for hardwareimplementation of the model.
 50. The computer program product of claim49, wherein the parameters for hardware implementation of the modelcomprise at least one of parameters for power requirements, clock ratesand size constraints.
 51. The computer program product of claim 49,wherein the parameters for hardware implementation of the model comprisea weighted combination of parameters for power requirements, clock ratesand size constraints.
 52. A computer program product for holdinginstructions executable in a computer for generating code from a model,comprising: determining a plurality of interfaces for a plurality ofportions of the model, each of the plurality of interfaces interfacingwith components in a different portion of the model; and automaticallygenerating code representative of the plurality of interfaces for theplurality of portions of the model, wherein when the code for theplurality of interfaces is compiled, an output of the compiler is usedto implement the plurality of interfaces in a hardware circuit of themodel.